package vn.edu.nuce.dao;

import org.hibernate.SessionFactory;

import vn.edu.nuce.model.User;

public class UserDaoImpl implements UserDao{
	private SessionFactory sessionFactory;

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public User getById(String id) {
		return (User) getSessionFactory().getCurrentSession().get(User.class, id);
	}

}
